package com.example.factoryModel.abstractClass;

import org.springframework.stereotype.Component;

@Component
public class Duck extends AbstractAnimal{

    @Override
   public void eat() {
        System.out.println("吃鱼!!");
    }

    @Override
   public void call() {
        System.out.println("嘎嘎!!");
    }

    @Override
    String getAnimalName() {
        return "鸭";
    }
}
